package com.zjl.学习.第08章_配置文件.B_读操作写;


import com.zjl.springbatch.util.OutColour;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.NonTransientResourceException;
import org.springframework.batch.item.ParseException;
import org.springframework.batch.item.UnexpectedInputException;

public class My08BItemReader implements ItemReader<String> {
    int k = 0;

    @Override
    public String read() throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException {
        OutColour.out.printlnRed("My08BItemReader 读 执行完毕\t" + ++k);
        if (k < 50) {
            return "My08BItemReader\t" + k;
        } else {
            return null;
        }
    }
}
